package com.taobao.jingling.web.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.taobao.api.TaobaoApiException;
import com.taobao.api.TaobaoJsonRestClient;
import com.taobao.api.TaobaoRestClient;

public class LoginServlet extends HttpServlet {

	
	
	private static final long serialVersionUID = 1L;

	public LoginServlet() {
		super();
	}

	
	public void destroy() {
		super.destroy(); 
	}

	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		 this.doPost(request, response);
	}

	
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
		
		String URL="http://sip.alisoft.com/sip/rest";
		String appkey = "28097";
		String secret = "42ff2240438d11deae718c0bea828c3d";
		try {
			TaobaoRestClient client = new TaobaoJsonRestClient(URL,appkey,secret);
			
			
		} catch (TaobaoApiException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		

		
	}

	public void init() throws ServletException {
		// Put your code here
	}

}
